#include "Player.h"
#include "Pique.h"

void InitializePlayer(player &p)
{
	p.score = 0;
	InitializeHand(p.h);
}

void DisplayPlayer(const player &p)
{

}

int PlayCard(const player &pl, const int currentPlayer)
{
	int c = -1;

	do 
	{
		GotoXY(positionMessage.x, positionMessage.y);
		std::cout << "Joueur " << currentPlayer + 1 << ", veuillez entrer votre carte: "; std::cin >> c;
		if (c < 0 || c > pl.h.nb)
		{
			GotoXY(positionMessage.x, positionMessage.y+1);
			std::cout << "Joueur " << currentPlayer + 1 << ", entree invalide. Choisissez une autre carte! "; std::cin >> c;;
		}
	} while (c < 0 || c > pl.h.nb);
	
	return c;
}

int PlaceBet(const player &pl)
{
	int bet;
	do {
		std::cin >> bet;
	} while (bet < 0 || bet > NB_HAND_CARDS);
	
	return bet;
}
